#!/bin/bash
#LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so $1;
ttr=0; #булевая переменная
while (ttr==0)
do 
if (ps -A|grep guvcview)||(ps -A|grep skype) then
if (ps -A|grep guvcview) then
pr=guvcview;
else pr=skype;
fi
killall -9 $pr;
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so $pr;
fi; 
sleep 21;
done;
exit 0;
